<div class="r0 p20 pt10 col-xs-12 BGFFF" ng-controller="userInterfaceCtrl">
<div class="col-xs-6 f16 fb p0 mb5">接口管理-【{{$stateParams.moduleName}}】</div>
<div class="col-xs-6 f14 p0 mb5 tr">
	<a type="button" class="btn btn-primary btn-sm" id="refresh" ng-click="getData(list.page.currentPage)"> <i class="iconfont fb">&#xe611;&nbsp;</i>刷新</a>
	<a type="button" class="btn btn-adorn btn-sm" onclick="history.back(-1);"> <i class="iconfont fb">&#xe605;&nbsp;</i>后退</a>
</div>
<div class="col-xs-12 bb1 bt1 pt15 p0 pb10">
		<button type="button" class="ml5 mt1 btn btn-success btn-sm fr" ng-click="getData(1);">
			<i class="iconfont">&#xe610;</i>&nbsp;查询
		</button>
		<div class="form-group w200 fr">
			<label class="sr-only" for="">名称</label>
			<div class="input-group">
				<div class="input-group-addon">名称</div>
				<input type="text" class="form-control input-xs dis-in-blo w120"
					placeholder="名称" id="interfaceName">
			</div>
		</div>
		<div class="form-group w300 fr mr10">
			<label class="sr-only" for="">URL</label>
			<div class="input-group">
				<div class="input-group-addon">URL</div>
				<input type="text" class="form-control input-xs dis-in-blo w120"
					placeholder="URL" id="url">
			</div>
		</div>
		<div class="cb"></div>
</div>
<div class="col-xs-12 mt20 p0 mb10 f14 tr">
	<span class="f12 C999" ng-if="!showOperation('PROJECT',$stateParams.projectId)">
		*权限不足，若为新增模块，请刷新页面
	</span>
	<a type="button" class="btn btn-success btn-sm cursor" ng-if="showOperation('PROJECT',$stateParams.projectId)"
		ng-click="changeDisplay('interFaceDetail','copyInterFace');detail('新增接口',1100,'user/interface/detail.do?id=NULL','&moduleId='+$stateParams.moduleId)">
		<i class="iconfont fb">&#xe604;</i>&nbsp;新增接口 
	</a>
	<a type="button" class="btn btn-danger btn-sm cursor" ng-if="showOperation('PROJECT',$stateParams.projectId)"
		ng-click="del('user/interface/delete.do?ids='+deleteIds,'','确认批量删除选中的接口？')"> 
		<i class="iconfont fb">&#xe60e;</i>&nbsp;批量删除
	</a>
</div>
<div class="col-xs-3 f16 fb pl0 mb10 pb5 mt20">接口列表</div>
<div class="f12 tr C999 col-xs-9 mt20">
		设置为模板后，新建接口时将根据该接口初始化接口内容
</div>
<div class="col-xs-12 p0">
	<table class="table table-bordered table-hover">
		<thead>
			<tr class="BGEEE">
				<th class="w60"><input type="checkbox" id="select-all" ng-click="selectAll('select-all','deleteIds',list)">&nbsp;全选</th>
				<th class="tc w100">名称</th>
				<th class="tc w300">URL</th>
				<th class="tc w60">版本</th>
				<th class="tc w150">最后修改人</th>
				<th class="tc w120">最后修改时间</th>
				<th class="w300 tc">操作</th>
			</tr>
		</thead>
		<tbody>
			<tr ng-repeat="item in list">
				<td><input type="checkbox" name="deleteIds" ng-click="checkboxSelect('deleteIds',item.id)"></td>
				<td class="tc">{{item.interfaceName}}</td>
				<td class="tc">{{item.url}}</td>
				<td class="tc">{{item.version}}</td>
				<td class="tc">{{item.updateBy}}</td>
				<td class="tc">{{item.updateTimeStr}}</td>
				<td class="tc">
					<a class="f12 text-primary mr10 cursor" ng-if="showOperation('PROJECT',$stateParams.projectId)"
						ng-click="detail('编辑【'+item.interfaceName+'】',1100,'user/interface/detail.do?id='+item.id,'',initEditInterFace)">
						<i class="iconfont f12">&#xe618;修改</i>
					</a>

					<a class="f12 text-primary mr10 cursor" ng-href="index.do#/{{item.projectId}}/front/interface/debug/{{item.id}}" target="_blank">
						<i class="iconfont">&#xe625;&nbsp;</i>调试
					</a>

					<a class="f12 text-danger mr10 cursor" title="删除"  ng-if="showOperation('PROJECT',$stateParams.projectId)"
						ng-click="del('user/interface/delete.do?id='+item.id,item.interfaceName)">
						<i class="iconfont f12">&#xe60e;删除</i>
					</a>


					<div class="dropdown dis-in-tab">
						<button class="btn btn-xs btn-adorn r20 dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
							更多...
							<span class="caret"></span>
						</button>
						<ul class="dropdown-menu min-w100 w100" aria-labelledby="dropdownMenu1">
							<li><a ng-href="front/interface/download/pdf.do?id={{item.id}}&pdf=true"><i class="iconfont f12">&#xe61e; PDF</i></a></li>
							<li><a ng-href="front/interface/download/pdf.do?id={{item.id}}&pdf=false"><i class="iconfont f12">&#xe637; WORD</i></a></li>
							<li role="separator" class="divider"></li>
							<li>
								<a class="f12 text-primary mr10 cursor" ng-href="index.do#/{{item.projectId}}/front/interfaceDetail/{{item.id}}" target="_blank">
									<i class="iconfont f12">&#xe60a;预览</i>
								</a>
							</li>
							<li>
								<a class="f12 text-primary mr10 cursor" ng-if="showOperation('LOG','');"  ng-href="admin.do#/log/list/{{item.id}}">
									<i class="iconfont">&#xe62b;&nbsp;</i>操作日志
								</a>
							</li>
							<li>
								<a class="f12 text-primary mr10 cursor" ng-if="showOperation('PROJECT',$stateParams.projectId)"
								   ng-click="detail('拷贝【'+item.interfaceName+'】',600,'user/interface/detail.do?id='+item.id,'',copyInterface)">
									<i class="iconfont f12">&#xe61d;拷贝</i>
								</a>
							</li>
							<li>
								<a class="f12 text-danger mr10 cursor" ng-if="showOperation('PROJECT',$stateParams.projectId)"
								   ng-click="sendRequest('user/module/setTemplate.do?id='+item.id)">
									<i class="iconfont f12"  ng-if="item.template">&#xe63d;取消模板</i>
									<i class="iconfont f12 text-success"  ng-if="!item.template">&#xe63d;设置模板</i>
								</a>
							</li>
						</ul>
					</div>
				<!--<div class="w50 fr tl" ng-if="showOperation('PROJECT',item.projectId)">
					<a class="f12 text-danger mr10 cursor" title="向上移" ng-click="changeSequence('user/interface/changeSequence.do',item.id,list[$index-1].id)" ng-if="$index>0">
						<i class="iconfont f12">&#xe623;</i>
					</a>
					<a class="f12 text-danger mr10 cursor" title="向下移" ng-click="changeSequence('user/interface/changeSequence.do',item.id,list[$index+1].id)" ng-if="$index<list.length-1">
						<i class="iconfont f12">&#xe624;</i>
					</a>
				</div>-->
				</td>
			</tr>

		</tbody>
	</table>
	<div ui-view="page"></div>
</div>
</div>
<div class="cb"></div>

